/*实现类，调用接口函数*/

#ifndef TRUEAPI_H
#define TRUEAPI_H

#include "api.h"

class TrueApi:public Api
{

public:
    TrueApi();
    ~TrueApi();

    QByteArray sendDateChange(QString time);

    QByteArray sendAddrAndGroupnumber(int addr,int groupnumber);

    QByteArray sendGroupNumber(int groupNumber);

    QByteArray sendYuanXin(int old_addr, int new_addr);

    QByteArray sendBegin(int flag);

    QByteArray sendOver(int flag);

    QByteArray requestClearAll();

    QByteArray requestClearOnly(int index2);

    QByteArray bindInfo(int addr,const QString& name,const QString& idCard);

    QByteArray sendId(int addr);


    QByteArray sendUporDownmsg(int code);

    /****
    *前端请求数据，有回复
    ****/
    QByteArray requestState();

    QByteArray requestBattery();

    QByteArray requestSearchDataApi(int groupNumber, int addr, const QString& time);

//    QByteArray sendHoles(int msg,int group_number);

    /****
     * 后端回复电量和状态信息
    */
    QByteArray pushTargetStateInfoApi();

    QByteArray pushTargetVoltageInfoApi();

    //后端主动给前端发送子弹信息
    QByteArray currentTargetBullet(const OneTaregtBullet& oneTaregtBullet);
    //后端发指定分组和靶号的数据
    QByteArray pushSearchDateApi();



//    QByteArray requestDate(int addr);

    QByteArray sendXandY(int addr,int x,int y);
};

#endif // TRUEAPI_H
